﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Data;

namespace MOMKeLABS.Controls.Window
{
    public partial class WindowHeaderControlBox : UserControl
    {

        // a reference the this headers parent window
        public MOMKeLABS.Controls.Window.Window ParentWindow { get; set; }

        public WindowHeaderControlBox()
        {
            InitializeComponent();
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            // set up the binding for the button state of the maximize button

            Binding bin = new Binding("State")
            {
                Source = this.ParentWindow,
                Mode = BindingMode.OneWay,
                Converter = new MOMKeLABS.Converters.WindowHeaderControlBoxMaximizeButtonConverter()
            };

            this.MaximizeButton.SetBinding(Button.ContentProperty, bin);
            
        }

    }
}
